<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<view class="text-area">
			<text class="title">{{ state.title }}</text>
			{{ state.formData }}
		</view>
	</view>
</template>

<script lang="ts" setup>
import { reactive, onMounted } from 'vue';
import { getHomeData } from '../../api/modules/index.js';
const state = reactive({
	title: '',
	formData: []
});
state.title = 'home';
const pageInit = () => {
	getHomeData()
		.then(res => {
			state.formData = res;
		})
		.catch(err => {
			console.error('[ERROR]', err);
		});
};
onMounted(() => {
	pageInit();
});
</script>

<style lang="scss" scoped>
.content {
	text-align: center;
}
</style>
